<template>
  <div class='container'>
      <div class="tishi">填写举报原因</div>
      <textarea class="weui-textarea"  placeholder="举报..." @change="onchange" :value="content" v-model="form.msg" maxlength="-1"/>
       <div class="btn" @click="toreport">举报</div>
  </div>
</template>

<script>
import {report} from "@/api/operate.js";
export default {
  components: {

  },

  data () {
    return {
       form:{}
    }
  },
  methods:{
     
     toreport(){
       if(this.form.msg&&this.form.msg.length>0){
          report(this.form).then(res=>{
             if(res.code==200){
               wx.navigateBack({
                 delta: 1
               });
             }
          })
       }
     }
  },
  created () {
     
  },
  
  onLoad(options){
      Object.assign(this.$data, this.$options.data())
      this.form=JSON.parse(options.info)
      console.log(this.form)
  },
  onUnload(){
     
  }
  
}
</script>
<style lang="scss">
page{
  background: #F4F5F5;
}
.tishi{
  font-size:14px;
  font-weight:400;
  color:rgba(102,102,102,1);
  line-height:18px;
  padding:10px 15px;
}
.weui-textarea{
  padding:10px;
  font-size:14px;
  font-weight:500;
  color:rgba(51,51,51,1);
  line-height:18px;
  box-sizing:border-box;
  background:#fff;
}
.btn{
  width:305px;
  height:45px;
  background:rgba(28,135,251,1);
  border-radius:5px;
  margin:33px auto;
  text-align:center;
  font-size:16px;
  font-weight:500;
  color:rgba(255,255,255,1);
  line-height:45px;
}
</style>
